#pragma once

#include <widgets/SCheckEx.h>
#include <widgets/SPopupWindow.h>

#include <QPaintEvent>
#include <QPushButton>
#include <QString>
#include <QWidget>

#include "core/ImageMgr.h"
#include "core/StyleMgr.h"

// CDlgAccCheck
class CDlgAccCheck : public SPopupWindow {
 public:
  CDlgAccCheck(QWidget* pParent = NULL);  // 标准构造函数
  virtual ~CDlgAccCheck();

 protected:
  virtual void paintEvent(QPaintEvent* event) override;
  void resizeEvent(QResizeEvent* event) override;

  void CreateButton();
  SCheckEx* CreateCheck(QString strText);

  void OnBtnOk();
  void OnBtnCancel();
  void OnCheckBtnDown();
  void DrawMain();

 protected:
  QFont m_lfHead, m_lfContent;
  SImage* m_imgButton;
  QPushButton* m_btnOK;
  QPushButton* m_btnCancel;
  SCheckEx* m_chAgree;
  bool m_bAgreed;
};
